package com.learning.security.dal.mysql;

import com.learning.security.dal.dataobject.RoleDO;
import com.learning.security.dal.dataobject.UserDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xxx
 * @since 2024-09-18
 */
@Mapper
public interface UserMapper extends BaseMapper<UserDO> {

    /**
     * 根据用户id查询一个角色，注意一个用户可能不止一种角色
     * @param uid
     * @return
     */
    List<RoleDO> getRolesByUid(Integer uid);
}
